home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 008 / say.arc / TALKDEMO.BAS (.txt) < prev   
Encoding:
GW-BASIC  |  1985-08-19  |  4.5 KB  |  108 lines

  1. 10  'Sample program demonstrating the SPEECH program
  2. 20  'by Andy McGuire
  3. 30  'Copyright 1984,
  4. 40  'All Rights Reserved.
  5. 50  '
  6. 60  SCREEN 0,1,0:WIDTH 40:LOCATE ,,0:COLOR 7,0,0:CLS:KEY OFF
  7. 70  NUMBER = 15
  8. 80  DIM TALK$(NUMBER)
  9. 90  DIM DISPLAY$(NUMBER)
  10. 100  FOR I=1 TO NUMBER:READ TALK$(I):NEXT I
  11. 110  FOR I=1 TO NUMBER:READ DISPLAY$(I):NEXT I
  12. 120  'Each TALK$ in array represents sentences to be passed to SPEECH.
  13. 130  'Each DISPLAY$ in array is an English sentence representing each TALK$.
  14. 140  FOR I=1 TO NUMBER
  15. 150  GOSUB 1010   'Print sentence.
  16. 160  GOSUB 1030   'Pass string to SPEECH.
  17. 170  GOSUB 1050   'Delay
  18. 180  NEXT I
  19. 190  RESTORE 1370:FOR I=1 TO 8:FOR J=1 TO 11:READ X:READ C:COLOR C:PRINT CHR$(X);:NEXT J:PRINT:NEXT I:FOR I=1 TO 2000:NEXT I
  20. 200  CLS:RESTORE 2000:I=0
  21. 210  NUMBER = 15        'redefine (read second set of strings)
  22. 220  ERASE TALK$:ERASE DISPLAY$          'clear old arrays
  23. 230  DIM TALK$(NUMBER)   'redimension array
  24. 240  DIM DISPLAY$(NUMBER)        'same thing
  25. 250  FOR I=1 TO NUMBER:READ TALK$(I):NEXT I
  26. 260  FOR I=1 TO NUMBER:READ DISPLAY$(I):NEXT I
  27. 270  FOR I=1 TO NUMBER
  28. 280  GOSUB 1010          'Print sentence.
  29. 290  GOSUB 1030          'Pass string to SPEECH.
  30. 300  GOSUB 1050          'Delay
  31. 310  NEXT I
  32. 900  END
  33. 1000  'Subroutines follow.
  34. 1010  PRINT DISPLAY$(I):PRINT     'Print it on screen.
  35. 1020  RETURN
  36. 1030  DEF SEG=0:SPEECH=972:CALL SPEECH (TALK$(I))         'pass string to SPEECH.
  37. 1040  RETURN
  38. 1050  FOR J=1 TO 300:NEXT         'Delay loop
  39. 1060  RETURN
  40. 1070  DATA "s-p-ee-ch b-i ae-n-d-ee m-ih-k g-w-i-r"
  41. 1080  DATA "k-ah-p-ee-r-i-t d-ee-s-eh-m-b-uh-r s-eh-k-uh-n-d n-i-n-t-ee-n h-uh-n-d-r-eh-d a-t-ee th-r-ee"
  42. 1090  DATA "aw-l r-i-t-s r-ee-s-u-r-v-d"
  43. 1100  DATA "a-ee b-ee s-ee d-ee ee-ee eh-f j-ee a-ch i j-a k-a eh-l eh-m eh-n oh-w p-ee k-y-oo ah-r eh-s t-ee y-oo v-ee d-uh-b-l-y-oo eh-k-s w-i z-ee"
  44. 1110  DATA "z-ee-r-oh w-uh-n t-oo th-r-ee f-oh-r f-i-v s-ih-k-s s-eh-v-eh-n a-a-t n-i-n t-eh-n"
  45. 1120  DATA "tz-uh r-a-ih-n ih-n s-p-a-ih-n"
  46. 1130  DATA "f-ah-l-l-s j-eh-n-t-l-ee ah-n tz-uh p-l-a-ih-n"
  47. 1140  DATA "h-ae-s ae-n-ee-b-ah-d-ee s-ee-n m-i d-aw-g"
  48. 1150  DATA "h-ih-s n-a-m ih-s ch-ah-r-l-ee"
  49. 1160  DATA "ae-n-d i m-ih-s h-ih-m v-ae-r-ee v-ae-r-ee m-uh-ch"
  50. 1170  DATA "tz-ih-s ih-s ae-n ee-m-r-j-eh-n-s-ee"
  51. 1180  DATA "uh k-ih-l-r t-uh-m-a-t-oh h-ae-s j-uh-s-t uh-t-ae-k-t"
  52. 1190  DATA "ae-n-d ih-s ee-t-ih-n-g tz-uh s-ih-t-ee"
  53. 1200  DATA "l-u-k ah-w-t"
  54. 1210  DATA "h-ee-r ih-t k-uh-m-s"
  55. 1220  DATA "SPEECH by Andy McGuire"
  56. 1230  DATA "Copyright December 2, 1983,"
  57. 1240  DATA "All Rights Reserved."
  58. 1250  DATA "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  59. 1260  DATA "0,1,2,3,4,5,6,7,8,9,10"
  60. 1270  DATA "The rain in Spain..."
  61. 1280  DATA "falls gently on the plain."
  62. 1290  DATA "Has anybody seen my dog?"
  63. 1300  DATA "His name is Charlie..."
  64. 1310  DATA "and I miss him very very much."
  65. 1320  DATA "This is an emergency..."
  66. 1330  DATA "A killer tomato has just attacked..."
  67. 1340  DATA "and is eating the city!"
  68. 1350  DATA "Look out!"
  69. 1360  DATA "Here it comes!!!"
  70. 1370  DATA 32,7,32,7,32,7,219,2,32,7,219,2,32,7,219,2,32,7,32,7,32,7
  71. 1380  DATA 32,7,32,7,219,2,219,4,219,4,219,4,219,4,219,4,219,2,32,7,32,7
  72. 1390  DATA 32,7,32,7,219,4,219,4,219,4,219,4,219,4,219,4,219,4,32,7,32,7
  73. 1400  DATA 32,7,219,4,219,4,32,7,219,15,219,4,32,7,219,15,219,4,219,4,32,7
  74. 1410  DATA 32,7,219,4,219,4,219,4,219,4,219,4,219,4,219,4,219,4,219,4,32,7
  75. 1420  DATA 32,7,219,4,219,4,219,4,219,12,32,7,32,7,219,4,219,4,219,4,32,7
  76. 1430  DATA 32,7,32,7,219,4,219,4,219,4,219,4,219,4,219,4,219,4,32,7,32,7
  77. 1440  DATA 32,7,32,7,32,7,219,4,219,4,219,4,219,4,219,4,32,7,32,7,32,7
  78. 2000  DATA "tz-ih-s ih-s tz-uh w-a-ee w-ee t-eh-l s-p-ee-ch"
  79. 2010  DATA "h-aw-w t-oo t-aw-k"
  80. 2020  DATA "k-uh-n-s-ih-d-r tz-uh f-ah-l-oh-w-ih-n-g s-eh-n-t-eh-n-s"
  81. 2030  DATA "        "
  82. 2040  DATA "w-ee w-u-d b-r-a-k tz-ih-s s-eh-n-t-eh-n-s"
  83. 2050  DATA "d-ah-w-n l-i-k tz-ih-s"
  84. 2060  DATA "tz-uh m-ae-n ih-n tz-uh m-oo-n"
  85. 2070  DATA "ih-s d-ae-n-s-ih-n-g        "
  86. 2080  DATA "uh f-oh-n-eh-m ih-s uh b-a-s-ih-k s-ah-w-n-d y-oo-n-ih-t"
  87. 2090  DATA "tz-uh s-p-ee-ch p-r-oh-g-r-ae-m ih-s k-a-p-uh-b-uh-l"
  88. 2100  DATA "uh-f r-ee-p-r-oh-d-oo-s-ih-n-g th-u-r-t-ee s-ih-k-s f-oh-n-eh-m-s"
  89. 2110  DATA "y-oo-s-ih-n-g tz-ee-s f-oh-n-eh-m-s"
  90. 2120  DATA "ih-n d-ih-f-uh-r-eh-n-t k-ah-m-b-ih-n-a-sh-uh-n-s"
  91. 2130  DATA "g-ih-v-s uh-s tz-uh ae-b-ih-l-ih-t-ee t-oo k-r-ee-a-t"
  92. 2140  DATA "l-ih-m-ih-t-l-eh-s-s v-oh-k-ae-b-y-oo-l-ae-r-ee s-p-ee-ch"
  93. 3000  DATA "This is the way we tell SPEECH..."
  94. 3010  DATA "how to talk."
  95. 3020  DATA "Consider the following sentence..."
  96. 3030  DATA "The man in the moon is dancing."
  97. 3040  DATA "We would break this sentence..."
  98. 3050  DATA "down like this..."
  99. 3060  DATA "tz-uh m-ae-n ih-n tz-uh m-oo-n"
  100. 3070  DATA "ih-s d-ae-n-s-ih-n-g"
  101. 3080  DATA "A phoneme is a basic sound unit."
  102. 3090  DATA "The SPEECH program is capable..."
  103. 3100  DATA "of reproducing 36 phonemes."
  104. 3110  DATA "Using these phonemes..."
  105. 3120  DATA "in different combinations..."
  106. 3130  DATA "gives us the ability to create..."
  107. 3140  DATA "limitless vocabulary speech."
  108.